'use strict';
/**
 * 系统设置——账户管理
 * @type {*}
 */
let underscore = require('underscore');
let RestifyProxy = require('../../util/RestifyProxy');
let StringUtil = require('../../util/StringUtil');
let Constant = require('../../model/Constant');
let baseService = require('../BaseService');
const URI = {
  LIST: '/users',//列表
  CREATE: '/users',//创建保存按钮
  UPDATE: '/users/{0}/disable',//修改确认按钮
  DELETE: '/users/{0}'//删除按钮
};

/*账户管理-列表数据*/
module.exports.accountManagementList = function (thiz, params) {
  return baseService.get(thiz, URI.LIST, params);
};
/*账户管理-创建页面-保存按钮*/
module.exports.accountManagementCreateSave = function (thiz, userId) {
  return baseService.put(thiz, StringUtil.format(URI.CREATE, userId));
};

/*账户管理-修改页面-确认按钮*/
module.exports.accountManagementUpdateSave = function (thiz, userId) {
  return baseService.put(thiz, StringUtil.format(URI.UPDATE, userId));
};
/*账户管理-删除按钮*/
module.exports.accountManagementDelete = function (thiz, userId) {
  return baseService.del(thiz, StringUtil.format(URI.DELETE, userId));
};
/*账户管理-重置密码*/
module.exports.accountManagementReset = function (thiz, userId) {
  return baseService.put(thiz, StringUtil.format(URI.RESET, userId));
};